<template>
  <div>
    <div>
      <span>{{ name }}</span>
      <button @click="jia(index)">+</button>
      <span> {{ number }}</span>
      <button @click="jian(index)">-</button>
    </div>
  </div>
</template>

<script>
export default {
  props: ["name", "number", "index"],
  methods: {
    jia(index) {
      this.$emit("zheng", index);
    },
    jian(index) {
      this.$emit("fu", index);
    },
  },
};
</script>

<style>
</style>